﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace BLL.SysManage
{
    public class T_PUB_LINK
    {
        private readonly DALL.SysManage.T_PUB_LINK dal = new DALL.SysManage.T_PUB_LINK();

        public List<Model.SysManage.T_PUB_LINK> GetpersonLink(string strUserID)
        {
            string strWhere = " UserID is null or UserID=''";
            if (strUserID != "")
            {
                strWhere = strWhere + string.Format(" or UserID='{0}'", strUserID);
            }
            return dal.GetListArray(strWhere);
        }
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(Model.SysManage.T_PUB_LINK model)
        {
            return dal.Add(model);
        }

        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Model.SysManage.T_PUB_LINK model)
        {
            return dal.Update(model);
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(int id)
        {

            return dal.Delete(id);
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Model.SysManage.T_PUB_LINK GetModel(int id)
        {

            return dal.GetModel(id);
        }
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            return dal.GetList(strWhere);
        }

        /// <summary>
        /// 获得数据列表（比DataSet效率高，推荐使用）
        /// </summary>
        public List<Model.SysManage.T_PUB_LINK> GetListArray(string strWhere)
        {
            return dal.GetListArray(strWhere);
        }
    }
}
